

from ronglian_sms_sdk import SmsSDK

from celery_task.main import app
import json

accId = '8aaf07087f77bf96017fde90cdc1352c'
accToken = 'eda9cc9178434ecb848420d6b6914f88'
appId = '8aaf07087f77bf96017fde90ceeb3533'

@app.task
def sms_code(mobile, code):
    sms_sdk = SmsSDK(accId, accToken, appId)
    tid = "1"
    datas = (code, "5")
    res = sms_sdk.sendMessage(tid, mobile, datas)
    res = json.loads(res)
    print("短信验证码》》》》》》》》》》》》》》。。",res)
    return res












